#include<iostream>
#include<vector>
using namespace std;

vector<int> add(vector<int>& a, vector<int>& b) {
    vector<int> c;
    int carry = 0;
    for(int i=0; i<a.size() || i<b.size() || carry; i++) {
        if(i < a.size()) carry += a[i];
        if(i < b.size()) carry += b[i];
        c.push_back(carry%10);
        carry /= 10;
    }
    return c;
}

int main() {
    int n;
    cin >> n;
    vector<vector<int> > dp(n+3);
    
    dp[0].push_back(1);
    dp[1].push_back(1);
    
    for(int i=2; i<=n; i++) {
        dp[i] = add(dp[i-1], dp[i-2]);
    }
    
    for(int i=dp[n].size()-1; i>=0; i--) {
        cout << dp[n][i];
    }
    return 0;
}
